package cn.gbase.jiangsu.data.transfer.bean;

import java.util.Date;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;

import cn.gbase.jiangsu.data.transfer.validation.annotation.Validations;

/**
 * 楼的单元.
 * 
 */
@Table("building_unit")
public class BuildingUnit extends BaseDto {

	/**
	 * ID.
	 */
	@Column
	@Id
	private int id;

	/**
	 * 单元号.
	 */
	@Column("unit_no")
	@Validations(required = true, strLen = { 1, 4 }, errorMsg = "单元号应为1-4个字符。")
	private String unitNo;

	/**
	 * 单元编码.
	 */
	@Column("unit_code")
	@Validations(required = false, strLen = { 0, 4 }, errorMsg = "单元编码应为1-4个字符。")
	private String unitCode;

	/**
	 * 所属楼.
	 */
	@Column("building_id")
	@Validations(required = true, limit = { 1 }, errorMsg = "请选择所属楼。")
	private int buildingId;

	/**
	 * 楼层数.
	 */
	@Column("floor_number")
	@Validations(required = false, limit = { 1, 100}, errorMsg = "楼层数应为1-100之间的数字。")
	private int floorNumber;

	/**
	 * 备注.
	 */
	@Column
	private String remark;

	/**
	 * 创建时间.
	 */
	@Column("create_date")
	private Date addtime;

	/**
	 * 创建人.
	 */
	@Column("create_user")
	private String createUser;

	/**
	 * 删除
	 */
	@Column("delete_flag")
	private int deleteFlag;
	
	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUnitNo() {
		return unitNo;
	}

	public void setUnitNo(String unitNo) {
		this.unitNo = unitNo;
	}

	public String getUnitCode() {
		return unitCode;
	}

	public void setUnitCode(String unitCode) {
		this.unitCode = unitCode;
	}

	public int getBuildingId() {
		return buildingId;
	}

	public void setBuildingId(int buildingId) {
		this.buildingId = buildingId;
	}

	public int getFloorNumber() {
		return floorNumber;
	}

	public void setFloorNumber(int floorNumber) {
		this.floorNumber = floorNumber;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getAddtime() {
		return addtime;
	}

	public void setAddtime(Date addtime) {
		this.addtime = addtime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

}
